#include<iostream>

int main()
{
	using namespace std;
	int a, n, i = 1, sn = 0, tn = 0;
	cout << "a,n=:";
	cin >> a >> n;

	while (i <= n)
	{
		tn = tn + a;
		sn = sn + tn;
		a = a * 10;
		++i;
	}

	cout << "a+aa+aaa+...=" << sn << endl;
	return 0;


}